{include file="public/header-static"/}
{include file="public/sidebar"/}


<div id="main">
    {include file="public/header"/}
    <main class="main-content">
        <div class="container">
            <div class="page-header">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                            <a href="#">首页</a>
                        </li>
                        <li class="breadcrumb-item active" aria-current="page">社群查看  </li>
                    </ol>
                </nav>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="card">
                        <div class="card-body">


                                <div class="form-group row">
                                    <input type="hidden" name="id" value="{$info.id}">
                                    <label for="" class="col-sm-1 col-form-label">社群名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="name"  class="form-control" placeholder="社群名称" value="{$info.name}">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label for="" class="col-sm-1 col-form-label">创建人</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="founder"  class="form-control"  placeholder="创建人" value="{$info.founder}">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label for="" class="col-sm-1 col-form-label">用户ID</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="uid"  class="form-control"  placeholder="用户ID" value="{$info.uid}">
                                    </div>
                                </div>


                                <div class="form-group row">
                                    <label class="col-sm-1 col-form-label">经营地址</label>
                                    <div class="input-group col-sm-8">
                                        <input class="form-control" type="text" style="width:33%;" value="{$info.province}">
                                        <input class="form-control" type="text" style="width:33%;" value="{$info.city}">
                                        <input class="form-control" type="text" style="width:33%;" value="{$info.area}">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label for="" class="col-sm-1 col-form-label">详细地址</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="location"  class="form-control"  placeholder="详细地址" value="{$info.location}">
                                    </div>
                                </div>

<!--                                <div class="form-group row">-->
<!--                                    <label class="col-sm-1 col-form-label">LOGO</label>-->
<!--                                    <div class="col-sm-2">-->
<!--                                        <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">-->
<!--                                            预览图：-->
<!--                                            <div class="layui-upload-list uploader-list" style="overflow: auto;" id="uploader-logo">-->
<!--                                                <div class="file-iteme">-->
<!--                                                    <div class="handle" src="{$info.logo}">-->
<!--                                                        <span class="fa fa-times" style="border-radius: 0.375rem 0.375rem 0 0;"></span>-->
<!--                                                    </div>-->
<!--                                                    <img style="width: 5rem;height: 5rem;border-radius: 0.375rem;" src="{$info.logo}">-->
<!--                                                </div>-->

<!--                                            </div>-->
<!--                                        </blockquote>-->
<!--                                    </div>-->
<!--                                </div>-->

                                <div class="form-group row">
                                    <label class="col-sm-1 col-form-label">群二维码</label>
                                    <div class="col-sm-2">
                                        <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                            预览图：
                                            <div class="layui-upload-list uploader-list" style="overflow: auto;" id="uploader-qrcode">

                                                <div class="file-iteme">
                                                    <div class="handle" src="{$info.qrcode}">
                                                        <span class="fa fa-times" style="border-radius: 0.375rem 0.375rem 0 0;"></span>
                                                    </div>
                                                    <img style="width: 5rem;height: 5rem;border-radius: 0.375rem;" src="{$info.qrcode}">
                                                </div>

                                            </div>
                                        </blockquote>
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-1 col-form-label">封面图片</label>
                                    <div class="col-sm-8">
                                        <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                            预览图：
                                            <div class="layui-upload-list uploader-list" style="overflow: auto;" id="uploader-images">

                                                {php}
                                                    if ($info['images']) {
                                                        $image_list = explode(',',$info['images']);
                                                        foreach ($image_list as $v)
                                                        {
                                                {/php}

                                                    <div class="file-iteme">
                                                        <div class="handle fm" src="{$v}">
                                                            <span class="fa fa-times" style="border-radius: 0.375rem 0.375rem 0 0;"></span>
                                                        </div>
                                                        <img style="width: 5rem;height: 5rem;border-radius: 0.375rem;" src="{$v}">
                                                    </div>

                                                {php}
                                                    } }
                                                {/php}


                                            </div>
                                        </blockquote>
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-1 col-form-label">VIDEO</label>
                                    <div class="input-group col-sm-4">
                                        <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;width: 25rem">
                                            预览视频：
                                            <div class="layui-upload-list" id="video-list" style="display: flex;margin-top: 0.625rem">
                                                {if $info.video}
                                                    <video width="320" src="{$info.video}" class="videos" controls="controls" loop></video>
                                                {/if}
                                            </div>
                                        </blockquote>
                                    </div>
                                </div>


                                <div class="form-group row">
                                    <label class="col-sm-1 col-form-label">社群分类</label>
                                    <div class="append input-group col-sm-8">
                                        {foreach $info.cateInfo as $key=>$val}
                                            <span class="btn btn-info del" data-content-id="{$key}" style="font-size: 10px;margin-right: 10px">{$val}</span>
                                        {/foreach}
                                    </div>
                                    <input type="hidden" class="form-control cids" name="cids" required="" aria-required="true" value="{$info.cids}">
                                </div>





                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">社群简介</label>
                                <div class="col-sm-8">
                                    <!--                                        <textarea id="content" name="content">{$info.content}</textarea>-->
                                    <textarea id="custom_text" placeholder="社群简介"  name="desc" rows="5" cols="91">{$info.desc}</textarea>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">社群详情</label>
                                <div class="col-sm-8">
                                    <textarea placeholder="社群详情" id="containers" name="content" type="text/plain" style="">{$info.content}</textarea>
                                </div>
                            </div>
                                

                                <button id="return" class="btn btn-secondary">返回</button>

                        </div>
                    </div>
                </div>
            </div>

        </div>
    </main>

    {include file="public/footer"/}

    <!-- 配置文件 -->
    <script type="text/javascript" src="__STATIC__/assets/js/plugins/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="__STATIC__/assets/js/plugins/ueditor/ueditor.all.js"></script>

    <script>

        // http://fex.baidu.com/ueditor/#start-toolbar
        // 实例化编辑器
        var ue = UE.getEditor('containers',{
            toolbars: [
                [
                    'undo', //撤销
                    'redo', //重做
                    'bold', //加粗
                    'indent', //首行缩进
                    'italic', //斜体
                    'underline', //下划线
                    'strikethrough', //删除线
                    'subscript', //下标
                    'fontborder', //字符边框
                    'superscript', //上标
                    'formatmatch', //格式刷
                    'blockquote', //引用
                    'selectall', //全选
                    'horizontal', //分隔线
                    'removeformat', //清除格式
                    'time', //时间
                    'date', //日期
                    'fontfamily', //字体
                    'fontsize', //字号
                    'paragraph', //段落格式
                    'simpleupload', //单图上传
                    'insertimage', //多图上传
                    'emotion', //表情
                    'spechars', //特殊字符
                    'insertvideo', //视频
                    'justifyleft', //居左对齐
                    'justifyright', //居右对齐
                    'justifycenter', //居中对齐
                    'justifyjustify', //两端对齐
                    'forecolor', //字体颜色
                    'backcolor', //背景色
                    'insertorderedlist', //有序列表
                    'insertunorderedlist', //无序列表
                    'rowspacingtop', //段前距
                    'rowspacingbottom', //段后距
                    'touppercase', //字母大写
                    'tolowercase', //字母小写
                    'background', //背景
                    'scrawl', //涂鸦
                ]
            ],
            initialFrameHeight:350
        });

        $('#return').click(function () {
            window.location.href = '{:url("/console/index")}';
        });

        $('#return').click(function () {
            window.location.href = '{:url("/console/rejectList")}';
        });

        // 编辑器
        layui.use('layedit', function(){
            var layedit = layui.layedit;
            index = layedit.build('content',{
                height: 350 //设置编辑器高度
                ,hideTool:['link','unlink','image']
            }); //建立编辑器
        });

    </script>

</div>